package us.wili.dev.model.example;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class OrderExample {
    protected Order order;

    protected boolean distinct;

    protected String lock;

    protected List oredCriteria;

    protected Selector selector;

    protected Limit limit;

    public OrderExample() {
        oredCriteria = new ArrayList<>();
        distinct = false;
        lock = "";
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public String getLock() {
        return lock;
    }

    public List getOredCriteria() {
        return oredCriteria;
    }

    public Selector getSelector() {
        return selector;
    }

    public Limit getLimit() {
        return limit;
    }

    public Selector select() {
        selector = new Selector();
        return selector;
    }

    public Order orderBy() {
        order = new Order();
        return order;
    }

    public void limit(int rowCount) {
        limit = new Limit(rowCount);
    }

    public void limit(int offset, int rowCount) {
        limit = new Limit(offset, rowCount);
    }

    public void forUpdate() {
        lock = "for update";
    }

    public void lockInShareMode() {
        lock = "lock in share mode";
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = new Criteria();
        oredCriteria.add(new Criteria());
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = new Criteria();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        distinct = false;
    }

    public void clearLock() {
        lock = "";
    }

    public void clearLimit() {
        limit = null;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                return;
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value) {
            if (value == null) {
                return;
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2) {
            if (value1 == null || value2 == null) {
                return;
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("`id` =", value);
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("`id` <>", value);
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("`id` >", value);
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("`id` >=", value);
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("`id` <", value);
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("`id` <=", value);
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("`id` in ", values);
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("`id` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("`id` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("`id` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andUseridIsNull() {
            addCriterion("`userid` is null");
            return (Criteria) this;
        }

        public Criteria andUseridIsNotNull() {
            addCriterion("`userid` is not null");
            return (Criteria) this;
        }

        public Criteria andUseridEqualTo(Long value) {
            addCriterion("`userid` =", value);
            return (Criteria) this;
        }

        public Criteria andUseridNotEqualTo(Long value) {
            addCriterion("`userid` <>", value);
            return (Criteria) this;
        }

        public Criteria andUseridGreaterThan(Long value) {
            addCriterion("`userid` >", value);
            return (Criteria) this;
        }

        public Criteria andUseridGreaterThanOrEqualTo(Long value) {
            addCriterion("`userid` >=", value);
            return (Criteria) this;
        }

        public Criteria andUseridLessThan(Long value) {
            addCriterion("`userid` <", value);
            return (Criteria) this;
        }

        public Criteria andUseridLessThanOrEqualTo(Long value) {
            addCriterion("`userid` <=", value);
            return (Criteria) this;
        }

        public Criteria andUseridIn(List<Long> values) {
            addCriterion("`userid` in ", values);
            return (Criteria) this;
        }

        public Criteria andUseridNotIn(List<Long> values) {
            addCriterion("`userid` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andUseridBetween(Long value1, Long value2) {
            addCriterion("`userid` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andUseridNotBetween(Long value1, Long value2) {
            addCriterion("`userid` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andShipnameIsNull() {
            addCriterion("`shipname` is null");
            return (Criteria) this;
        }

        public Criteria andShipnameIsNotNull() {
            addCriterion("`shipname` is not null");
            return (Criteria) this;
        }

        public Criteria andShipnameEqualTo(String value) {
            addCriterion("`shipname` =", value);
            return (Criteria) this;
        }

        public Criteria andShipnameNotEqualTo(String value) {
            addCriterion("`shipname` <>", value);
            return (Criteria) this;
        }

        public Criteria andShipnameGreaterThan(String value) {
            addCriterion("`shipname` >", value);
            return (Criteria) this;
        }

        public Criteria andShipnameGreaterThanOrEqualTo(String value) {
            addCriterion("`shipname` >=", value);
            return (Criteria) this;
        }

        public Criteria andShipnameLessThan(String value) {
            addCriterion("`shipname` <", value);
            return (Criteria) this;
        }

        public Criteria andShipnameLessThanOrEqualTo(String value) {
            addCriterion("`shipname` <=", value);
            return (Criteria) this;
        }

        public Criteria andShipnameLike(String value) {
            addCriterion("`shipname` like", value);
            return (Criteria) this;
        }

        public Criteria andShipnameNotLike(String value) {
            addCriterion("`shipname` not like", value);
            return (Criteria) this;
        }

        public Criteria andShipnameIn(List<String> values) {
            addCriterion("`shipname` in ", values);
            return (Criteria) this;
        }

        public Criteria andShipnameNotIn(List<String> values) {
            addCriterion("`shipname` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andShipnameBetween(String value1, String value2) {
            addCriterion("`shipname` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andShipnameNotBetween(String value1, String value2) {
            addCriterion("`shipname` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andAddressIsNull() {
            addCriterion("`address` is null");
            return (Criteria) this;
        }

        public Criteria andAddressIsNotNull() {
            addCriterion("`address` is not null");
            return (Criteria) this;
        }

        public Criteria andAddressEqualTo(String value) {
            addCriterion("`address` =", value);
            return (Criteria) this;
        }

        public Criteria andAddressNotEqualTo(String value) {
            addCriterion("`address` <>", value);
            return (Criteria) this;
        }

        public Criteria andAddressGreaterThan(String value) {
            addCriterion("`address` >", value);
            return (Criteria) this;
        }

        public Criteria andAddressGreaterThanOrEqualTo(String value) {
            addCriterion("`address` >=", value);
            return (Criteria) this;
        }

        public Criteria andAddressLessThan(String value) {
            addCriterion("`address` <", value);
            return (Criteria) this;
        }

        public Criteria andAddressLessThanOrEqualTo(String value) {
            addCriterion("`address` <=", value);
            return (Criteria) this;
        }

        public Criteria andAddressLike(String value) {
            addCriterion("`address` like", value);
            return (Criteria) this;
        }

        public Criteria andAddressNotLike(String value) {
            addCriterion("`address` not like", value);
            return (Criteria) this;
        }

        public Criteria andAddressIn(List<String> values) {
            addCriterion("`address` in ", values);
            return (Criteria) this;
        }

        public Criteria andAddressNotIn(List<String> values) {
            addCriterion("`address` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andAddressBetween(String value1, String value2) {
            addCriterion("`address` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andAddressNotBetween(String value1, String value2) {
            addCriterion("`address` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andShipphoneIsNull() {
            addCriterion("`shipphone` is null");
            return (Criteria) this;
        }

        public Criteria andShipphoneIsNotNull() {
            addCriterion("`shipphone` is not null");
            return (Criteria) this;
        }

        public Criteria andShipphoneEqualTo(String value) {
            addCriterion("`shipphone` =", value);
            return (Criteria) this;
        }

        public Criteria andShipphoneNotEqualTo(String value) {
            addCriterion("`shipphone` <>", value);
            return (Criteria) this;
        }

        public Criteria andShipphoneGreaterThan(String value) {
            addCriterion("`shipphone` >", value);
            return (Criteria) this;
        }

        public Criteria andShipphoneGreaterThanOrEqualTo(String value) {
            addCriterion("`shipphone` >=", value);
            return (Criteria) this;
        }

        public Criteria andShipphoneLessThan(String value) {
            addCriterion("`shipphone` <", value);
            return (Criteria) this;
        }

        public Criteria andShipphoneLessThanOrEqualTo(String value) {
            addCriterion("`shipphone` <=", value);
            return (Criteria) this;
        }

        public Criteria andShipphoneLike(String value) {
            addCriterion("`shipphone` like", value);
            return (Criteria) this;
        }

        public Criteria andShipphoneNotLike(String value) {
            addCriterion("`shipphone` not like", value);
            return (Criteria) this;
        }

        public Criteria andShipphoneIn(List<String> values) {
            addCriterion("`shipphone` in ", values);
            return (Criteria) this;
        }

        public Criteria andShipphoneNotIn(List<String> values) {
            addCriterion("`shipphone` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andShipphoneBetween(String value1, String value2) {
            addCriterion("`shipphone` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andShipphoneNotBetween(String value1, String value2) {
            addCriterion("`shipphone` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andTypeIsNull() {
            addCriterion("`type` is null");
            return (Criteria) this;
        }

        public Criteria andTypeIsNotNull() {
            addCriterion("`type` is not null");
            return (Criteria) this;
        }

        public Criteria andTypeEqualTo(Long value) {
            addCriterion("`type` =", value);
            return (Criteria) this;
        }

        public Criteria andTypeNotEqualTo(Long value) {
            addCriterion("`type` <>", value);
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThan(Long value) {
            addCriterion("`type` >", value);
            return (Criteria) this;
        }

        public Criteria andTypeGreaterThanOrEqualTo(Long value) {
            addCriterion("`type` >=", value);
            return (Criteria) this;
        }

        public Criteria andTypeLessThan(Long value) {
            addCriterion("`type` <", value);
            return (Criteria) this;
        }

        public Criteria andTypeLessThanOrEqualTo(Long value) {
            addCriterion("`type` <=", value);
            return (Criteria) this;
        }

        public Criteria andTypeIn(List<Long> values) {
            addCriterion("`type` in ", values);
            return (Criteria) this;
        }

        public Criteria andTypeNotIn(List<Long> values) {
            addCriterion("`type` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andTypeBetween(Long value1, Long value2) {
            addCriterion("`type` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andTypeNotBetween(Long value1, Long value2) {
            addCriterion("`type` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIsNull() {
            addCriterion("`order_totalprice` is null");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIsNotNull() {
            addCriterion("`order_totalprice` is not null");
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceEqualTo(BigDecimal value) {
            addCriterion("`order_totalprice` =", value);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotEqualTo(BigDecimal value) {
            addCriterion("`order_totalprice` <>", value);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceGreaterThan(BigDecimal value) {
            addCriterion("`order_totalprice` >", value);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("`order_totalprice` >=", value);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceLessThan(BigDecimal value) {
            addCriterion("`order_totalprice` <", value);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("`order_totalprice` <=", value);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceIn(List<BigDecimal> values) {
            addCriterion("`order_totalprice` in ", values);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotIn(List<BigDecimal> values) {
            addCriterion("`order_totalprice` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("`order_totalprice` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andOrderTotalpriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("`order_totalprice` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andOrderNumIsNull() {
            addCriterion("`order_num` is null");
            return (Criteria) this;
        }

        public Criteria andOrderNumIsNotNull() {
            addCriterion("`order_num` is not null");
            return (Criteria) this;
        }

        public Criteria andOrderNumEqualTo(Long value) {
            addCriterion("`order_num` =", value);
            return (Criteria) this;
        }

        public Criteria andOrderNumNotEqualTo(Long value) {
            addCriterion("`order_num` <>", value);
            return (Criteria) this;
        }

        public Criteria andOrderNumGreaterThan(Long value) {
            addCriterion("`order_num` >", value);
            return (Criteria) this;
        }

        public Criteria andOrderNumGreaterThanOrEqualTo(Long value) {
            addCriterion("`order_num` >=", value);
            return (Criteria) this;
        }

        public Criteria andOrderNumLessThan(Long value) {
            addCriterion("`order_num` <", value);
            return (Criteria) this;
        }

        public Criteria andOrderNumLessThanOrEqualTo(Long value) {
            addCriterion("`order_num` <=", value);
            return (Criteria) this;
        }

        public Criteria andOrderNumIn(List<Long> values) {
            addCriterion("`order_num` in ", values);
            return (Criteria) this;
        }

        public Criteria andOrderNumNotIn(List<Long> values) {
            addCriterion("`order_num` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andOrderNumBetween(Long value1, Long value2) {
            addCriterion("`order_num` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andOrderNumNotBetween(Long value1, Long value2) {
            addCriterion("`order_num` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andCreatedAtEqualTo(LocalDateTime value) {
            addCriterion("`created_at` =", value);
            return (Criteria) this;
        }

        public Criteria andCreatedAtNotEqualTo(LocalDateTime value) {
            addCriterion("`created_at` <>", value);
            return (Criteria) this;
        }

        public Criteria andCreatedAtGreaterThan(LocalDateTime value) {
            addCriterion("`created_at` >", value);
            return (Criteria) this;
        }

        public Criteria andCreatedAtGreaterThanOrEqualTo(LocalDateTime value) {
            addCriterion("`created_at` >=", value);
            return (Criteria) this;
        }

        public Criteria andCreatedAtLessThan(LocalDateTime value) {
            addCriterion("`created_at` <", value);
            return (Criteria) this;
        }

        public Criteria andCreatedAtLessThanOrEqualTo(LocalDateTime value) {
            addCriterion("`created_at` <=", value);
            return (Criteria) this;
        }

        public Criteria andCreatedAtIn(List<LocalDateTime> values) {
            addCriterion("`created_at` in ", values);
            return (Criteria) this;
        }

        public Criteria andCreatedAtNotIn(List<LocalDateTime> values) {
            addCriterion("`created_at` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andCreatedAtBetween(LocalDateTime value1, LocalDateTime value2) {
            addCriterion("`created_at` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andCreatedAtNotBetween(LocalDateTime value1, LocalDateTime value2) {
            addCriterion("`created_at` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtEqualTo(LocalDateTime value) {
            addCriterion("`updated_at` =", value);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtNotEqualTo(LocalDateTime value) {
            addCriterion("`updated_at` <>", value);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtGreaterThan(LocalDateTime value) {
            addCriterion("`updated_at` >", value);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtGreaterThanOrEqualTo(LocalDateTime value) {
            addCriterion("`updated_at` >=", value);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtLessThan(LocalDateTime value) {
            addCriterion("`updated_at` <", value);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtLessThanOrEqualTo(LocalDateTime value) {
            addCriterion("`updated_at` <=", value);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtIn(List<LocalDateTime> values) {
            addCriterion("`updated_at` in ", values);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtNotIn(List<LocalDateTime> values) {
            addCriterion("`updated_at` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtBetween(LocalDateTime value1, LocalDateTime value2) {
            addCriterion("`updated_at` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andUpdatedAtNotBetween(LocalDateTime value1, LocalDateTime value2) {
            addCriterion("`updated_at` not between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andVersionIsNull() {
            addCriterion("`version` is null");
            return (Criteria) this;
        }

        public Criteria andVersionIsNotNull() {
            addCriterion("`version` is not null");
            return (Criteria) this;
        }

        public Criteria andVersionEqualTo(Long value) {
            addCriterion("`version` =", value);
            return (Criteria) this;
        }

        public Criteria andVersionNotEqualTo(Long value) {
            addCriterion("`version` <>", value);
            return (Criteria) this;
        }

        public Criteria andVersionGreaterThan(Long value) {
            addCriterion("`version` >", value);
            return (Criteria) this;
        }

        public Criteria andVersionGreaterThanOrEqualTo(Long value) {
            addCriterion("`version` >=", value);
            return (Criteria) this;
        }

        public Criteria andVersionLessThan(Long value) {
            addCriterion("`version` <", value);
            return (Criteria) this;
        }

        public Criteria andVersionLessThanOrEqualTo(Long value) {
            addCriterion("`version` <=", value);
            return (Criteria) this;
        }

        public Criteria andVersionIn(List<Long> values) {
            addCriterion("`version` in ", values);
            return (Criteria) this;
        }

        public Criteria andVersionNotIn(List<Long> values) {
            addCriterion("`version` not  in ", values);
            return (Criteria) this;
        }

        public Criteria andVersionBetween(Long value1, Long value2) {
            addCriterion("`version` between", value1, value2);
            return (Criteria) this;
        }

        public Criteria andVersionNotBetween(Long value1, Long value2) {
            addCriterion("`version` not between", value1, value2);
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }

    public static class Selector {
        private List<String> columns = new ArrayList<>();

        public int getSize() {
            return columns.size();
        }

        public Selector addWithAlias(String column) {
            columns.add(column+ "AS `" + column + "`");
            return this;
        }

        public List<String> getColumns() {
            return columns;
        }

        public Selector id() {
            columns.add("order.id");
            return this;
        }

        public Selector userid() {
            columns.add("order.userid");
            return this;
        }

        public Selector shipname() {
            columns.add("order.shipname");
            return this;
        }

        public Selector address() {
            columns.add("order.address");
            return this;
        }

        public Selector shipphone() {
            columns.add("order.shipphone");
            return this;
        }

        public Selector type() {
            columns.add("order.type");
            return this;
        }

        public Selector orderTotalprice() {
            columns.add("order.order_totalprice");
            return this;
        }

        public Selector orderNum() {
            columns.add("order.order_num");
            return this;
        }

        public Selector createdAt() {
            columns.add("order.created_at");
            return this;
        }

        public Selector updatedAt() {
            columns.add("order.updated_at");
            return this;
        }

        public Selector version() {
            columns.add("order.version");
            return this;
        }

        public Selector goods() {
            columns.add("order.goods");
            return this;
        }

        public void clear() {
            columns.clear();
        }
    }

    public static class Order {
        private List<String> columns = new ArrayList<>();

        public int getSize() {
            return columns.size();
        }

        public List<String> getColumns() {
            return columns;
        }

        public Order add(String clause) {
            columns.add(clause);
            return this;
        }

        public Order ascId() {
            columns.add("order.id ASC");
            return this;
        }

        public Order descId() {
            columns.add("order.id DESC");
            return this;
        }

        public Order ascUserid() {
            columns.add("order.userid ASC");
            return this;
        }

        public Order descUserid() {
            columns.add("order.userid DESC");
            return this;
        }

        public Order ascShipname() {
            columns.add("order.shipname ASC");
            return this;
        }

        public Order descShipname() {
            columns.add("order.shipname DESC");
            return this;
        }

        public Order ascAddress() {
            columns.add("order.address ASC");
            return this;
        }

        public Order descAddress() {
            columns.add("order.address DESC");
            return this;
        }

        public Order ascShipphone() {
            columns.add("order.shipphone ASC");
            return this;
        }

        public Order descShipphone() {
            columns.add("order.shipphone DESC");
            return this;
        }

        public Order ascType() {
            columns.add("order.type ASC");
            return this;
        }

        public Order descType() {
            columns.add("order.type DESC");
            return this;
        }

        public Order ascOrderTotalprice() {
            columns.add("order.order_totalprice ASC");
            return this;
        }

        public Order descOrderTotalprice() {
            columns.add("order.order_totalprice DESC");
            return this;
        }

        public Order ascOrderNum() {
            columns.add("order.order_num ASC");
            return this;
        }

        public Order descOrderNum() {
            columns.add("order.order_num DESC");
            return this;
        }

        public Order ascCreatedAt() {
            columns.add("order.created_at ASC");
            return this;
        }

        public Order descCreatedAt() {
            columns.add("order.created_at DESC");
            return this;
        }

        public Order ascUpdatedAt() {
            columns.add("order.updated_at ASC");
            return this;
        }

        public Order descUpdatedAt() {
            columns.add("order.updated_at DESC");
            return this;
        }

        public Order ascVersion() {
            columns.add("order.version ASC");
            return this;
        }

        public Order descVersion() {
            columns.add("order.version DESC");
            return this;
        }

        public Order ascGoods() {
            columns.add("order.goods ASC");
            return this;
        }

        public Order descGoods() {
            columns.add("order.goods DESC");
            return this;
        }

        public void clear() {
            columns.clear();
        }
    }

    public static class Limit {
        private int offset;

        private int rowCount;

        private boolean isLmtRow;

        public int getOffset() {
            return offset;
        }

        public int getRowCount() {
            return rowCount;
        }

        public boolean isIsLmtRow() {
            return isLmtRow;
        }

        public Limit(int rowCount) {
            this.rowCount = rowCount; 
            isLmtRow = false;
        }

        public Limit(int offset, int rowCount) {
            this.offset = offset; 
            this.rowCount = rowCount;
            isLmtRow = true;
        }
    }
}